import 'package:flutter/material.dart';
import 'package:flutter_animation/widget/explode/explode_body.dart';

class ExplodeView extends StatelessWidget {
  final String imagePath;
  final double imagePosFromLeft;
  final double imagePosFromTop;

  const ExplodeView({
    @required this.imagePath,
    @required this.imagePosFromTop,
    @required this.imagePosFromLeft,
  });

  @override
  Widget build(BuildContext context) {
    // 此变量包含屏幕大小
    final screenSize = MediaQuery.of(context).size;

    return Container(
      child: ExplodeViewBody(
        screenSize: screenSize,
          imagePath: imagePath,
          imagePosFromLeft: imagePosFromLeft,
          imagePosFromTop: imagePosFromTop,
      )
    );
  }
}
